package daobeauty.interceptor.invoke.fill;

import org.hibernate.Query;

/**
 * Fills the parameters of a query with all given parameters.
 * 
 * @author M.Serhat Cinar
 *
 */
public class PlainQueryFill implements ParameterFillStrategy {
	public void fillParameters(Object q, Object [] parameters) {
		final Query query = (Query) q;
		for (int i=0; i<parameters.length; i++){
			query.setParameter(i, parameters[i]);
		}
	}
	
	public String toString(){
		return "plain";
	}

}
